Optimal. Leaf size=60 \[ -\frac {x}{a^3}-\frac {7 \tanh ^{-1}(\cos (c+d x))}{2 a^3 d}+\frac {3 \cot (c+d x)}{a^3 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2948, 2836,
3855, 3852, 8, 3853} \begin {gather*} \frac {3 \cot (c+d x)}{a^3 d}-\frac {7 \tanh ^{-1}(\cos (c+d x))}{2 a^3 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^3 d}-\frac {x}{a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2836
Rule 2948
Rule 3852
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) \cot ^3(c+d x)}{(a+a \sin (c+d x))^3} \, dx &=\frac {\int \csc ^3(c+d x) (a-a \sin (c+d x))^3 \, dx}{a^6}\\ &=\frac {\int \left (-a^3+3 a^3 \csc (c+d x)-3 a^3 \csc ^2(c+d x)+a^3 \csc ^3(c+d x)\right ) \, dx}{a^6}\\ &=-\frac {x}{a^3}+\frac {\int \csc ^3(c+d x) \, dx}{a^3}+\frac {3 \int \csc (c+d x) \, dx}{a^3}-\frac {3 \int \csc ^2(c+d x) \, dx}{a^3}\\ &=-\frac {x}{a^3}-\frac {3 \tanh ^{-1}(\cos (c+d x))}{a^3 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^3 d}+\frac {\int \csc (c+d x) \, dx}{2 a^3}+\frac {3 \text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^3 d}\\ &=-\frac {x}{a^3}-\frac {7 \tanh ^{-1}(\cos (c+d x))}{2 a^3 d}+\frac {3 \cot (c+d x)}{a^3 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(126\) vs. \(2(60)=120\).
time = 0.34, size = 126, normalized size = 2.10 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6 \left (-8 (c+d x)+12 \cot \left (\frac {1}{2} (c+d x)\right )-\csc ^2\left (\frac {1}{2} (c+d x)\right )-28 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+28 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\sec ^2\left (\frac {1}{2} (c+d x)\right )-12 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{8 d (a+a \sin (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.38, size = 84, normalized size = 1.40
method | result | size |
derivativedivides | \(\frac {\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {6}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+14 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(84\) |
default | \(\frac {\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {6}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+14 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(84\) |
risch | \(-\frac {x}{a^{3}}+\frac {{\mathrm e}^{3 i \left (d x +c \right )}+{\mathrm e}^{i \left (d x +c \right )}+6 i {\mathrm e}^{2 i \left (d x +c \right )}-6 i}{a^{3} d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d \,a^{3}}+\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d \,a^{3}}\) | \(101\) |
norman | \(\frac {\frac {229 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}-\frac {7 \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d a}-\frac {1}{8 a d}+\frac {7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}+\frac {\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d a}-\frac {5 x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {x \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {13 x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {25 x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {38 x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {5 x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {29 \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}-\frac {25 x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {13 x \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {46 x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {46 x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {38 x \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2245 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}+\frac {2005 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}+\frac {717 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a d}+\frac {2079 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}+\frac {177 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a d}+\frac {1567 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a d}+\frac {47 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a d}+\frac {407 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a d}+\frac {51 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{3}}\) | \(540\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 138 vs.
\(2 (56) = 112\).
time = 0.54, size = 138, normalized size = 2.30 \begin {gather*} -\frac {\frac {\frac {12 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{a^{3}} + \frac {16 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} - \frac {28 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} - \frac {{\left (\frac {12 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{2}}{a^{3} \sin \left (d x + c\right )^{2}}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 109, normalized size = 1.82 \begin {gather*} -\frac {4 \, d x \cos \left (d x + c\right )^{2} - 4 \, d x + 7 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 7 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 12 \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right )}{4 \, {\left (a^{3} d \cos \left (d x + c\right )^{2} - a^{3} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.51, size = 108, normalized size = 1.80 \begin {gather*} -\frac {\frac {8 \, {\left (d x + c\right )}}{a^{3}} - \frac {28 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{3}} + \frac {42 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1}{a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}} - \frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.35, size = 161, normalized size = 2.68 \begin {gather*} \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^3\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^3\,d}+\frac {2\,\mathrm {atan}\left (\frac {2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-7\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{7\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{a^3\,d}+\frac {7\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2\,a^3\,d}+\frac {3\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^3\,d}-\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________